|
|
|
|
|
|
|
Key Activities in Designing Your Database |
|
|
|
|
|
|
|
|
Creating a good database design involves the following seven key activities: |
|
|
|
|
|
|
|
|
Determining the data required for the application |
|
|
|
|
|
|
|
|
Organizing the data into tables |
|
|
|
|
|
|
|
|
Establishing the relationships between tables |
|
|
|
|
|
|
|
|
Setting index and validation requirements for the data |
|
|
|
|
|
|
|
|
Creating and storing any necessary queries for the application |
|
|
|
|
|
|
|
|
Now, look briefly at the initial two activities in the list. First, take a look at modeling the application. When you model an application, you first should determine the tasks that the application is to perform. For example, if you're maintaining a membership list, you know that you want to create phone directories and mailing lists of the members. As you're determining the tasks to be performed by the application, you are creating what is called the functional specification. For a project that you are creating, you probably know all the tasks that you want to perform, but writing down these tasks in a specification document is a good idea. This document can help you keep focused on what you want your program to do. If you're creating the program for another person, a functional specification becomes an agreement of what the application will contain. This specification also can show milestones that need to be achieved on a set schedule. |
|
|
|
|
|
|
|
|
When you're creating the program for other people, the best way to learn what task must be performed is to talk to the people requesting the work. As a first step, you can determine if they already have a system that they are looking to replace, or if they have reports that they want to produce. Then you can ask a lot of questions until you understand the users' objectives for the program. |
|
|
|
|
|
|
|
|
After you determine the functional specifications for the program, you can start determining what data the program needs. In the case of a membership application, knowing that you have to produce directories and mailing lists tells you that the database needs to contain the address and phone number of each of the members. Taking this situation a little further, you know that, by presorting mail by ZIP code, you can take advantage of reduced rate postage. Therefore, you need an index or query that places the mailing list information in zip code order. So, you can see that the model not only tells you the data needed but also defines other components of the database. |
|
|
|
|
|
|
|
|
One of the key aspects of good database design is determining how the data will be organized in the database. To have a good design, you should organize the data in a way that makes the information easy to retrieve and makes maintenance of the database easy. Within a database, data is stored in one or more tables. For many database applications, you can accomplish efficient data management by storing data in multiple tables and by establishing relationships |
|
|
|
|
|